﻿@{ IUser currentUser = UserContext.CurrentUser;}
<div class="tn-top-nav">
    <div class="container-fluid">
        <nav class="navbar">
            <ul class="nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                        @if (currentUser != null)
                        {
                        @Html.ShowUserAvatar(userId: currentUser.UserId, avatarSizeType: AvatarSizeType.Micro, enableClientCaching: false, enableNavigate: false, isShowUserCard: false)
                            <span title="@currentUser.DisplayName">@HtmlUtility.TrimHtml(currentUser.DisplayName, 5)</span>
                        }
                        <i class="fa fa-angle-down"></i>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a target="_blank" href="@SiteUrls.Instance().Home()">返回前台</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="@SiteUrls.Instance().SignOut()">退出</a></li>
                    </ul>
                </li>

            </ul>
        </nav>
    </div>
</div>
   